<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>输出100 以内的所有质数</title>
</head>
<body>
<script>
    var primeNumbers = [];
    var n, i;

    for (n = 1; n <= 100; n++) {
        var isPrime = true;
        for (i = 2; i < n; i++) {
            if (n % i === 0) {
                isPrime = false;
                break;
            }
        }
        if (isPrime && n > 1) {
            primeNumbers.push(n);
        }
    }
        alert(primeNumbers.join(", "));
</script>
</body>
</html>